package com.unionpay.mpds.web.action.index;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.json.annotations.JSON;

import com.unionpay.mpds.web.action.BaseAction;

@ParentPackage("json-center")
public class JsonAction extends BaseAction {

	private String message;
	private String text;
	
	@Action(value="json", results={@Result(name="success", type="json")}, params={"contentType", "text/html"})
	public String json() {
		message = "message1";
		text = "text1";
		return SUCCESS;
	}
	
	@JSON
	public String getMessage() {
		return message;
	}
	
	public void setMessage(String message) {
		this.message = message;
	}
	
	@JSON
	public String getText() {
		return text;
	}
	
	public void setText(String text) {
		this.text = text;
	}
	
}
